/**
 * jims
 */
package com.jims.master.modules.api.oper.web;


import com.jims.master.common.web.BaseController;
import com.jims.master.common.web.impl.BaseDto;
import com.jims.master.modules.oper.entity.PriceList;
import com.jims.master.modules.oper.service.PriceListService;
import com.jims.master.modules.sys.entity.Dict;
import com.jims.master.modules.sys.service.DictService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 价表相关rest
 * @author zhangyao
 */
@RestController
@RequestMapping(value = "his/api/oper")
public class PriceListRest extends BaseController {

	@Autowired
	private PriceListService priceListService;
    @Autowired
    private DictService dictService;

    /**
     * 获取核算科目
     * @return
     */
    @RequestMapping(value = "accountingDict")
    public List<BaseDto> accountingDict(){
        Dict dict=new Dict();
        dict.setType("RECK_ITEM_CLASS_DICT");
        List<BaseDto> dtoList=dictService.findListDto(dict);
        return dtoList;
    }

    /**
     * 获取价表数据
     * @param orgId 机构id
      * @return
     */
    @RequestMapping(value = "priceList")
    public List<BaseDto> priceList(@RequestParam String orgId){
        PriceList priceList=new PriceList();
        priceList.setOrgId(orgId);
        List<BaseDto> dtoList=priceListService.findListDto(priceList);
        return dtoList;
    }



}